﻿<div ng-controller="Monitor.SdbResource.Transaction.Ctrl" ng-container="{}">
   <div style="background:#F4F4F4;" ng-container="{height:57}">
      <div class="nav-new">
         <div ng-click="GotoNodeList()">{{autoLanguage("节点")}}</div>
         <div class="active" ng-click="GotoResources()">{{autoLanguage("资源")}}</div>
         <div ng-click="GotoHostList()">{{autoLanguage("主机")}}</div>
         <!--<div ng-click="GotoUser()">{{autoLanguage("安全")}}</div>-->
      </div>
   </div>
   <div style="padding:8px 15px 10px 15px;" ng-container="{offsetY:-60}">
      <div class="underlineTab" style="padding-top:10px;border-top:2px solid #F0F0F0;" ng-container="{height:50,marginTop:10}">
         <ul class="left">
            <li>
               <a href="#Monitor/SDB-Resources/Session">{{autoLanguage("会话")}}</a>
            </li>
            <li>
               <a href="#Monitor/SDB-Resources/Context">{{autoLanguage("上下文")}}</a>
            </li>
            <li ng-if="ModuleMode == 'distribution'">
               <a href="#Monitor/SDB-Resources/Domain">{{autoLanguage("域")}}</a>
            </li>
            <li ng-if="ModuleMode == 'distribution'">
               <a href="#Monitor/SDB-Resources/Procedure">{{autoLanguage("存储过程")}}</a>
            </li>
            <li class="active">
               <a href="#Monitor/SDB-Resources/Transaction">{{autoLanguage("事务")}}</a>
            </li>
            <!--<li>
               <a>{{autoLanguage("锁")}}</a>
            </li>
            <li>
               <a>{{autoLanguage("慢查询")}}</a>
            </li>-->
            <li>
               <a href="#/Monitor/SDB-Resources/Charts">{{autoLanguage("图表")}}</a>
            </li>
         </ul>
      </div>

      <div ng-windows="info as SessionInfo.config" windows-callback="SessionInfo.callback">
         <table class="table loosen border">
            <tr>
               <td style="width:40%;background-color:#F1F4F5;"><b>Key</b></td>
               <td style="width:60%;background-color:#F1F4F5;"><b>Value</b></td>
            </tr>
            <tr>
               <td>SessionID</td>
               <td>{{info['SessionID']}}</td>
            </tr>
            <tr ng-repeat="(key, value) in info track by $index" ng-if="key != 'SessionID'">
               <td>{{key}}</td>
               <td>{{value}}</td>
            </tr>
         </table>
      </div>

      <div ng-windows="info as TransactionInfo.config" windows-callback="TransactionInfo.callback">
         <table class="table loosen border">
            <tr>
               <td style="width:40%;background-color:#F1F4F5;"><b>Key</b></td>
               <td style="width:60%;background-color:#F1F4F5;"><b>Value</b></td>
            </tr>
            <tr>
               <td>TransactionID</td>
               <td>{{info['TransactionID']}}</td>
            </tr>
            <tr ng-repeat="(key, value) in info track by $index" ng-if="key != 'TransactionID'">
               <td>{{key}}</td>
               <td>{{value}}</td>
            </tr>
         </table>
      </div>

      <div ng-container="{offsetY:-75,marginTop:15}" ng-table="TransactionTable['options']" table-title="TransactionTable['title']" table-content="TransactionInfo in TransactionTable['body']" table-callback="TransactionTable['callback']">
         <div class="Ellipsis" table-key="TransactionID">
            <a class="linkButton" ng-click="ShowTrans(TransactionInfo['i'])">{{TransactionInfo.TransactionID}}</a>
         </div>
         <div class="Ellipsis" table-key="NodeName">
            {{TransactionInfo['NodeName']}}
         </div>
         <div class="Ellipsis" table-key="SessionID">
            <a class="linkButton" ng-click="ShowSession(TransactionInfo['i'])">{{TransactionInfo['SessionID']}}</a>
         </div>
         <div class="Ellipsis" table-key="GroupName">
            <a class="linkButton" ng-click="GotoGroup( TransactionInfo['GroupName'] )">{{TransactionInfo['GroupName']}}</a>
         </div>
         <div class="Ellipsis" table-key="$auto">
            {{$autoValue}}
         </div>
      </div>

   </div>
</div>